<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="${BASE_PATH}/static/css/common.css"/>
<link rel="stylesheet" type="text/css" href="${BASE_PATH}/static/css/dl.css"/>
<link rel="stylesheet" type="text/css" href="${BASE_PATH}/static/css/jgxxgl1.css"/>
<script type="text/javascript" src="${BASE_PATH}/static/js/jquery.js"></script>
<script src="${BASE_PATH}/static/js/jquery.lightbox_me.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" src="${BASE_PATH}/static/js/login.js"></script>		
<script type="text/javascript" src="${BASE_PATH}/static/js/jquery.form.js"></script>		
<script type="text/javascript" src="${BASE_PATH}/static/js/default.js"></script>
<script type="text/javascript" src="${BASE_PATH}/static/js/ajaxupload.js"></script>		
<script type="text/javascript">
	RootDir="${BASE_PATH}";
	$(function(){
		//上传图片
		new AjaxUpload('#addLabProdPic', {
			action: '${BASE_PATH}/upload', 
			name: 'picFile',
			responseType: 'json',
			onSubmit : function(file , ext){
				if (ext && /^(jpg|png|bmp)$/.test(ext.toLowerCase())){
					this.setData({
						'picName': file
					});
				} else {
					alert("请上传格式为 jpg|png|bmp 的图片！");
					return false;				
				}
			},
			onComplete : function(file,response){
				if(response.error) {
					alert(response.error);
					return;
				}
				//只允许一个
				ImageIDList=[];
				ImageList=[];
				
				ImageIDList.push(response.ID);
				ImageList.push(response);
				$('#img_id_list').val(ImageIDList.join());
				RefreshImagePanel();
			}		
		});
	})

	function AjaxSubmit()
    {  
    	var cValue =$("#form1").formSerialize();
        $.ajax({
            type: "POST",
            url: "${BASE_PATH}/res_human/save",
			dataType : "json",
			cache : false,
			data : cValue + "&no-cache=" + Math.round(Math.random() * 10000),
			success : onAfterSubmit
		});
	}
	
	function onAfterSubmit(ret) {
		//保存成功
		if (ret.Code == 1) {
			alert("数据保存成功！");
			window.location.reload();
			return;
		}

		if (ret.Code == 2) {
			alert("用户登录失败！");
			return;
		}

		//验证失败
		if (ret.Code == 3) {
			var vCtrlID = ret.ctrlID;
			var vMessage = ret.message;
			$("#" + vCtrlID).focus();
			alert(vMessage);
			return;
		}
	}	
</script>
<title>人力资源</title>
</head>
<body>
<!--head start-->
<#include "../common/myspacetop.ftl"/> 
<!--head end-->
<div class="fnav system_fnav">
   <ul>
      <li><a href="###" target="_top">首页</a></li>
      <li><span>></span></li>
      <li><a href="###" target="_top">我的预约</a></li>
      <li><span>></span></li>
      <li><a href="###" target="_top">所有预约</a></li>
   </ul>   
</div>
<div class="my-content">
   <#include "../common/left.ftl"/> 
   <div class="coright"> 
      <h2 class="my-bt"><span>人力资源</span></h2>
      <div class="content-con">
        <form id="form1" method="post">
         <div class="content-con1">
            <span class="bttext">您的姓名或团队名称:</span>
            <input type="text" id="res_title" name="res_title" />
         </div>
         <div class="content-con3">
            <span class="bttext">性别:</span>
            <div>
               <input name="res_gender" type="radio" value="1" checked="checked" />男
            </div>
            <div>
               <input name="res_gender" type="radio" value="2" />女
            </div>            
         </div>
         <div class="content-con1">
            <span class="bttext">出生年月:</span>
            <input type="text" id="res_birthdate" name="res_birthdate" /> 
         </div>
         <div class="content-con1">
            <span class="bttext">职称:</span>
            <select id="res_certtype" name="res_certtype">	
				<#list typeid_45_list as rowkey>  
           		<li><option value="${rowkey.code_name_id}">${rowkey.code_value}</option>
           		</#list>	
        	</select>
         </div>
         <div class="content-con1">
            <span class="bttext">职称领域:</span>
            <input type="text" id="res_proname" name="res_proname" /> 
         </div>         
          <div class="content-con1">
			<span class="bttext">擅长领域:</span>
           	<select id="res_prozone" name="res_prozone">	
				<#list typeid_43_list as rowkey>  
           		<li><option value="${rowkey.code_name_id}">${rowkey.code_value}</option>
           		</#list>	
        	</select>
         </div>         
         <div class="content-con1">
            <span class="bttext">联系人:</span><input type="text"  id="res_contact" name="res_contact" />
         </div>
         <div class="content-con1">
            <span class="bttext">联系电话:</span><input type="text" id="res_contact_phone" name="res_contact_phone"  />
         </div>
         <div class="content-con1">
            <span class="bttext">展示方式:</span>
        	<select id="res_viewtype" name="res_viewtype">	
				<#list typeid_44_list as rowkey>  
           		<li><option value="${rowkey.code_name_id}">${rowkey.code_value}</option>
           		</#list>	
        	</select>
         </div>      
         <div class="content-con2">
            <span class="bttext">具体要求:</span>
            <textarea id="res_requirement" name="res_requirement"></textarea>
         </div>
         <div class="content-con2">
            <span class="bttext">个人照片:</span>
            <div class="scpic">
				<button id="addLabProdPic">选择图片</button>
                <div id="img_div">
                </div>
            </div>
         </div>         
         <div class="clear"></div>
         <div class="bcbutton1"><a href="###" class="bccg">保存为草稿</a>
         <input type="button" value="提交" onclick="AjaxSubmit();"  /></div>
         <input type="hidden" id="img_id_list" name="img_id_list" />
         </form>
      </div>
   </div>
</div>
<div class="clear"></div>  
</body>
</html>
